The present invention relates to an image processing apparatus and method and, more particularly, to an image processing apparatus and method for generating a mosaic image.
Mosaic is xe2x80x9ca design made by inlaying a combination of small pieces of various colors of stone, glass, marble, and the like into a floor, wall, or the like, or a technique of obtaining such designxe2x80x9d (Gendai Kokugo Jiten, Sanseido). Using this technique, a design or an image (mosaic image) can be formed by combining a large number of picture images. A mosaic image is generated by image processing as follows. That is, an original design or image is segmented into tiles, and material images most similar to images of those tiles are pasted on those tile areas.
However, the above-mentioned technique has the following problem.
More specifically, since an identical material image may often be pasted on a plurality of segmented tile areas, a concentrated region of identical material images often appears in the generated mosaic image. In such case, the material images generate a texture pattern, and an unexpected pattern may result depending on the original design or image.
The present invention has been made to solve the above problem, and has as its object to prevent an unexpected texture pattern from being formed upon generating a mosaic image.
It is another object of the present invention to prevent an unexpected texture pattern from being formed and to improve the image quality of a mosaic image by appropriately limiting use of material image upon generating the mosaic image.
It is still another object of the present invention to prevent a texture pattern from being formed in a mosaic image by limiting use of each material image to once upon generating the mosaic image.
It is still another object of the present invention to prevent an unexpected texture pattern from being formed and to improve the image quality of a mosaic image by limiting use of each material image to once and selecting areas to be replaced by material images in a random order upon generating the mosaic image.
It is still another object of the present invention to prevent an unexpected texture pattern from being formed and to improve the image quality of a mosaic image by limiting the number of times of use of each material image to a plurality of number of times, which is determined in advance.
It is still another object of the present invention to prevent an unexpected texture pattern from being formed and to improve the image quality of a mosaic image by limiting the number of times of use of each material image to a plurality of number of times, which is determined in advance, and selecting areas to be replaced by material images in a random order.
It is still another object of the present invention to improve the image quality of a mosaic image by limiting the number of times of use of each material image to a plurality of number of times, which is determined in advance, and inhibiting identical material images from being placed at neighboring positions.
It is still another object of the present invention to generate a mosaic image according to user""s favor by allowing the user to replace desired areas of an automatically generated mosaic image by material images of user""s choice.